package com.san.oms.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.san.common.utils.PageUtils;
import com.san.common.utils.Query;
import com.san.oms.dao.ModelDao;
import com.san.oms.domain.ModelScDTO;
import com.san.oms.service.ModelService;

/**
 * 评价模型服务实现
 * @author Administrator
 *
 */
@Service
public class ModelServiceImpl implements ModelService{
	
	@Autowired
	private ModelDao dao;

	@Override
	public int save(Object o) throws Exception {
		return dao.save(o);
	}

	@Override
	public int doEdit(Object o) throws Exception {
		return dao.doEdit(o);
	}

	@Override
	public int remove(Long id) throws Exception {
		return dao.remove(id);
	}

	@Override
	public int batchRemove(Long[] ids) throws Exception {
		return dao.batchRemove(ids);
	}

	@Override
	public PageUtils findModel(Query query) {
		List<ModelScDTO> list = dao.findModel(query);
		int total = dao.findModelCount(query);
		return new PageUtils(list, total);
	}

	@Override
	public List<ModelScDTO> findModelList(Query query) {
		return dao.findModelList(query);
	}

	@Override
	public Object getById(Long id) throws Exception{
			return dao.getById(id);
	}
}
